﻿#pragma once
struct FontCharSet;

struct _stStrategyProvinceNameD3DVertex
{
	float VertexID;			// 顶点标识
};

class CStrategyProvinceNameRender
{
private:
	LPDIRECT3DVERTEXBUFFER9			m_pVB;					// 顶点缓冲区
	LPDIRECT3DINDEXBUFFER9			m_pIB;					// 顶点缓冲区指针
	LPDIRECT3DVERTEXDECLARATION9	m_pDecl;				// 顶点声明接口
	LPD3DXEFFECT					m_pEffect;				// 效果接口

	DWORD							m_dwNumVertices = 0;	// 顶点个数

	const FontCharSet* m_pFontCharSet = nullptr;

public:
	CStrategyProvinceNameRender();
	~CStrategyProvinceNameRender();

	HRESULT OnCreateDevice(IDirect3DDevice9* pd3dDevice);
	HRESULT OnResetDevice(IDirect3DDevice9* pd3dDevice);
	void    OnFrameMove(const D3DXMATRIXA16* pWorldViewProject, const D3DXVECTOR4* vCamLookAtDir);
	void	OnFrameRender(IDirect3DDevice9* pd3dDevice);
	void	OnLostDevice();
	void	OnDestroyDevice();

private:
	HRESULT CreateSquare(LPDIRECT3DDEVICE9 pd3dDevice);
};